package com.itgaoshu.hospitalproject.service.impl;

import com.itgaoshu.hospitalproject.bean.Departments;
import com.itgaoshu.hospitalproject.mapper.DepartmentsMapper;
import com.itgaoshu.hospitalproject.service.DepartmentsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Service
@Transactional
public class DepartmentServiceImpl implements DepartmentsService {
    @Autowired
    private DepartmentsMapper departmentsMapper;

    @Override
    public List<Departments> departmentList(Departments departments) {
        return departmentsMapper.departmentList(departments);
    }

    @Override
    public int addDepartment(Departments departments) {
        return departmentsMapper.addDepartment(departments);
    }

    @Override
    public int count(Departments departments) {
        return departmentsMapper.count(departments);
    }
}
